home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / graphics / a-g / dust / batchfiles / splines.bat < prev    next >
DOS Batch File  |  1995-12-15  |  2KB  |  70 lines

  1. ;create datafiles showing all datafiles and use gnuplot
  2. ;to show the results
  3. ;
  4. ;Requirements: Dust 2.20 or higher
  5. ;              gnuplot in one of your the c:-drawers
  6. ;              normal Amiga-Shell (because of the echo-commands)
  7. ;              a t:-assignment
  8.  
  9. ;change this
  10. set(echo,off)
  11. set(splinesubdiv,10)
  12.  
  13. ;create the data-file
  14. !echo >t:data1 -3 -2
  15. !echo >>t:data1 -2 -1
  16. !echo >>t:data1 -1 1.5
  17. !echo >>t:data1 0 2.8
  18. !echo >>t:data1 1 2.1
  19. !echo >>t:data1 2 2.0
  20. !echo >>t:data1 3 1.8
  21. !echo >>t:data1 4 1.2
  22. !echo >>t:data1 5 0.5
  23. !echo >>t:data1 6 -0.5
  24. !echo >>t:data1 7 -1.8
  25. !echo >>t:data1 8 -2
  26. !echo >>t:data1 9 -4
  27.  
  28. ;create the spline-files
  29. ;open
  30. set(splineends,open)
  31. set(splinetype,cubicb)
  32. interpolatedata(t:data1,t:cubicB)
  33. set(splinetype,quadb)
  34. interpolatedata(t:data1,t:quadB)
  35. set(splinetype,catmullrom)
  36. interpolatedata(t:data1,t:catmullRom)
  37. set(splinetype,cubicbezier)
  38. interpolatedata(t:data1,t:cubicBezier)
  39. set(splinetype,quadbezier)
  40. interpolatedata(t:data1,t:quadBezier)
  41.  
  42. ;closed
  43. set(splineends,closed)
  44. set(splinetype,cubicb)
  45. interpolatedata(t:data1,t:cubicB2)
  46. set(splinetype,quadb)
  47. interpolatedata(t:data1,t:quadB2)
  48. set(splinetype,catmullrom)
  49. interpolatedata(t:data1,t:catmullRom2)
  50. set(splinetype,cubicbezier)
  51. interpolatedata(t:data1,t:cubicBezier2)
  52. set(splinetype,quadbezier)
  53. interpolatedata(t:data1,t:quadBezier2)
  54.  
  55. ;create the gnuplot-batch-file
  56. !echo >t:gnuplot.bat "set data style linespoints"
  57. !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:catmullRom2' title 'closed Catmull-Rom'",'t:catmullRom' title 'open Catmull-Rom'
  58. !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:cubicB2' title 'closed cubic B'",'t:cubicB' title 'open cubic B'
  59. !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:quadB2' title 'closed quadratic B'",'t:quadB' title 'open quadratic B'
  60. !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:cubicBezier2' title 'closed cubic Bezier'",'t:cubicBezier' title 'open cubic Bezier'
  61. !echo >>t:gnuplot.bat "plot 't:data1' title 'data','t:cubicBezier2' title 'closed quadratic Bezier'",'t:quadBezier' title 'open quadratic Bezier'
  62.  
  63. !gnuplot t:gnuplot.bat
  64.  
  65. !delete >NIL: t:cubicB t:quadB t:catmullRom t:cubicBezier t:quadBezier
  66. !delete >NIL: t:cubicB2 t:quadB2 t:catmullRom2 t:cubicBezier2 t:quadBezier2
  67. !delete >NIL: t:data1 t:gnuplot.bat
  68.  
  69. ;request("Quit Dust ?",Yes,Yes)
  70.